{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "d7989394",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(384, 512)\n",
      "(256, 1)\n"
     ]
    }
   ],
   "source": [
    "import cv2 as cv\n",
    "\n",
    "img = cv.imread('../data/home.jpg',0)\n",
    "\n",
    "images, channels, mask = [img], [0], None\n",
    "histSize, ranges = [256], [0,256]\n",
    "\n",
    "hist = cv.calcHist(images, channels, mask,\n",
    "                   histSize, ranges)\n",
    "print(img.shape)\n",
    "print(hist.shape)\n",
    "\n",
    "# cv.imshow(\"hist\", hist)\n",
    "# cv.waitKey(0)\n",
    "\n",
    "# cv.destroyAllWindows()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3e0cfdd9",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
